Skip to main content

All Questions

1vote
0answers
222views

Proper code structure for a Servlet using caching and async

I'm using an Java Servlet (with embedded Jetty, no Spring, no frameworks) and I'm adding asynchronous processing and caching to it. The exact implementation is irrelevant to this question and it's not ...
maaartinus's user avatar
5votes
1answer
4kviews

Pattern for subclass overload with different arguments

I'm in the process of writing an bidirectional, asynchronous socket server and server handler. The base handler class I'm working off of is as follows: class BaseAsyncSocketHandler: async def ...
noahbkim's user avatar
1vote
1answer
2kviews

Handling multiple asynchronous events - Wait for pending offers to process on new offer?

I have a programming problem, that I don't know how to solve. And while I have provided a sample of my code, I am interested in a conceptual answer on how to resolve this problem. On a tradeOffers ...
Skanker's user avatar
2votes
0answers
272views

Callback pattern handling exceptions - Best practices in .NET 3.5

I am looking to implement the callback pattern with error handling such that error is caught and pass to the callback code with the response. Since I am using .NET 3.5, I cant use Task (TAP) pattern ...
Kalyanaraman Santhanam's user avatar
-2votes
2answers
198views

Calling blocking functions and execute code when result is ready, but without callbacks

I am designing an application that has some scripting capabilities: the host application may call the scripts to perform some operations when some events occur. To keep it easy and newbie-friendly, ...
Lorenzo Pistone's user avatar
4votes
1answer
587views

Asynchronous update design/interaction patterns

These days many apps support asynchronous updates. For example, if you're looking at a list of widgets and you delete one of them then rather than wait for the roundtrip to the server, the app can ...
Andy Waite's user avatar
4votes
2answers
2kviews

How do you decide to Queue/Dispatch events Sync or Async? (in Observer Pattern)

Consider the following elements in an event-driven architecture: Observable Object Event Dispatcher Observer(Listener) Now, we have two messages: From Observable Object to Event Dispatcher From Event ...
salman.mirghasemi's user avatar
1vote
5answers
856views

Ways of handling asynchronous receive calls

I am implementing a primitive message-passing system. Currently, I am designing a receive function for async calls. Can I implement such a async receive function without using callback functions?
user avatar

close